﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace NorthwindClient
{
    /// <summary>
    /// Interaction logic for TestGroupControlBinding.xaml
    /// </summary>
    public partial class TestGroupControlBinding : Page
    {
        public TestGroupControlBinding()
        {
            InitializeComponent();
        }

        private void btnBack_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.GetNavigationService(this).Navigate(new
                Uri("Home.xaml", UriKind.Relative));
        }

        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            DateTime loadStartTime = DateTime.Now;
            //this.DataContext = GetCellControls();
            this.itcGroup.ItemsSource = CellControl.GetCellControls();
            //this.itcGroup.ItemsSource = new List<CellControl>();
            TimeSpan loadTime = DateTime.Now - loadStartTime;
            string title = lblTitle.Content.ToString();
            lblTitle.Content = title + "  Takes " + loadTime.TotalSeconds + "s to load";
        }
    }
}
